Skip to content

[AIG-1532] Add a gateway-level setting to force BYOK - #33229

Open
superhighfives wants to merge 2 commits into
productionfrom
docs/AIG-1532-ai-gateway-byok-only
Open

[AIG-1532] Add a gateway-level setting to force BYOK#33229
superhighfives wants to merge 2 commits into
productionfrom
docs/AIG-1532-ai-gateway-byok-only

Conversation

@superhighfives

Copy link
Copy Markdown
Contributor

Add a gateway-level setting that forces third-party requests to use customer-provided credentials instead of falling back to Unified Billing.

Jira: https://jira.cfdata.org/browse/AIG-1532

@cloudflare-docs-bot

cloudflare-docs-bot Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Review

⚠️ 3 warnings found in commit 02ffdee.

👉 Fix in your agent 👈
Fix the following review findings in PR #33229 (https://github.com/cloudflare/cloudflare-docs/pull/33229).

Before making changes, review each finding and present a brief summary table:
- For each finding, state whether you agree, disagree, or need clarification
- If you disagree (e.g. the fix requires disproportionate effort for minimal benefit,
  or the finding is factually incorrect), explain why
- If you need clarification before deciding, ask those questions
- Then share your plan for which issues to tackle and in what order

After triaging, follow this order:
1. Post a comment on this PR for any findings you are skipping, with the finding ID and your reasoning.
2. Then commit the fixes for the legitimate findings.

The comment must come before the commit — the bot reads PR comments when a new
push triggers a review, so skip comments posted after the push will be missed.

---

## Code Review

### Warnings (3)

#### CR-f8e1e03c9741 · Factually contradictory billing claim
- **File:** `src/content/docs/ai-gateway/configuration/manage-gateway.mdx` line 87
- **Issue:** The new sentence states Workers AI requests "use standard Workers AI account billing, not AI Gateway Unified Billing." The "Configure Workers AI billing" section on the same page (above) instructs users to select **Unified billing** so that "Workers AI requests routed through this gateway will deduct from your AI Gateway credit balance" — so Workers AI requests *can* use AI Gateway Unified Billing depending on the gateway's Workers AI billing setting. As written, the new sentence is incorrect for any gateway configured with Unified billing and contradicts the page's own instructions.
- **Fix:** Clarify that the statement refers to the default billing mode or to the Unified Billing fallback that this setting disables, e.g. "They use the gateway's configured Workers AI billing mode (standard or unified) — this setting only disables the Unified Billing fallback for third-party provider requests."

#### CR-812563c4074b · Contradicts page's own billing docs
- **File:** `src/content/docs/ai-gateway/features/unified-billing.mdx` line 97
- **Issue:** The added text claims Workers AI requests "use standard Workers AI account billing, not AI Gateway Unified Billing," but the same page's "Use Unified Billing" section states that when the gateway's Workers AI Billing setting is set to "Unified billing," Workers AI requests routed through that gateway deduct from the prepaid credit balance. The two statements conflict for users with that configuration.
- **Fix:** Reword to avoid the billing claim, e.g. clarify that this setting does not block Workers AI requests and that Workers AI billing follows the gateway's Workers AI Billing configuration (which can be Unified billing), or otherwise reconcile the statement with the earlier section.

#### CR-6a4c326489e8 · Inaccurate categorical claim contradicts same page
- **File:** `src/content/docs/ai-gateway/configuration/manage-gateway.mdx` line 87
- **Issue:** The added line states Workers AI requests "use standard Workers AI account billing, not AI Gateway Unified Billing" as an unconditional fact, but the same page's "Configure Workers AI billing" section documents a gateway setting that switches Workers AI requests to Unified billing ("Workers AI requests routed through this gateway will deduct from your AI Gateway credit balance in real time"), and unified-billing.mdx lists "To use credits for Workers AI, set your gateway's Workers AI Billing setting to Unified billing" as a prerequisite. The statement is only true for the default (Standard billing) configuration.
- **Fix:** Qualify the claim, e.g. "By default they use standard Workers AI account billing; if the gateway's Workers AI Billing setting is set to Unified billing, they use AI Gateway Unified Billing instead." This setting itself does not change Workers AI billing.

Code Review

This code review is in beta and may not always be helpful — use your judgment.

Warnings (3)
File Issue
ai-gateway/configuration/manage-gateway.mdx line 87 Factually contradictory billing claim — The new sentence states Workers AI requests "use standard Workers AI account billing, not AI Gateway Unified Billing." The "Configure Workers AI billing" section on the same page (above) instructs users to select **Unified billing** so that "Workers AI requests routed through this gateway will deduct from your AI Gateway credit balance" — so Workers AI requests *can* use AI Gateway Unified Billing depending on the gateway's Workers AI billing setting. As written, the new sentence is incorrect for any gateway configured with Unified billing and contradicts the page's own instructions. Fix: Clarify that the statement refers to the default billing mode or to the Unified Billing fallback that this setting disables, e.g. "They use the gateway's configured Workers AI billing mode (standard or unified) — this setting only disables the Unified Billing fallback for third-party provider requests."
ai-gateway/features/unified-billing.mdx line 97 Contradicts page's own billing docs — The added text claims Workers AI requests "use standard Workers AI account billing, not AI Gateway Unified Billing," but the same page's "Use Unified Billing" section states that when the gateway's Workers AI Billing setting is set to "Unified billing," Workers AI requests routed through that gateway deduct from the prepaid credit balance. The two statements conflict for users with that configuration. Fix: Reword to avoid the billing claim, e.g. clarify that this setting does not block Workers AI requests and that Workers AI billing follows the gateway's Workers AI Billing configuration (which can be Unified billing), or otherwise reconcile the statement with the earlier section.
ai-gateway/configuration/manage-gateway.mdx line 87 Inaccurate categorical claim contradicts same page — The added line states Workers AI requests "use standard Workers AI account billing, not AI Gateway Unified Billing" as an unconditional fact, but the same page's "Configure Workers AI billing" section documents a gateway setting that switches Workers AI requests to Unified billing ("Workers AI requests routed through this gateway will deduct from your AI Gateway credit balance in real time"), and unified-billing.mdx lists "To use credits for Workers AI, set your gateway's Workers AI Billing setting to Unified billing" as a prerequisite. The statement is only true for the default (Standard billing) configuration. Fix: Qualify the claim, e.g. "By default they use standard Workers AI account billing; if the gateway's Workers AI Billing setting is set to Unified billing, they use AI Gateway Unified Billing instead." This setting itself does not change Workers AI billing.

Conventions

No convention issues found.

Style Guide Review

No style-guide issues found.

Commands

Only codeowners can run commands. Post a comment with the command to trigger it.

Command Description
/review Runs a review now. Incremental if a prior review exists, full if not.
/full-review Re-reviews the entire PR diff from scratch, ignoring incremental history. Useful after a rebase, when you want a fresh review, or if the bot gets out of sync and reports issues that no longer exist.
/ignore-review-limit Permanently lifts the 2-review automatic limit for this PR. Future pushes will trigger reviews as normal.
/disable-auto-review Stops automatic reviews from triggering on future pushes to this PR. Codeowners can still run /review or /full-review manually.
/rebase Rebases the PR branch against production. On conflict, attempts to resolve automatically using AI. Stops with an explanation if confidence is not high enough.

@github-actions github-actions Bot added product:ai-gateway AI Gateway: https://developers.cloudflare.com/ai-gateway/ size/s labels Sep 4, 2026
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/docs/ai-gateway/ @abhishekkankani, @adriandlam, @aninibread, @ethulia, @kathayl, @kflansburg, @mattrothenberg, @mchenco, @palashgo, @roerohan, @shridhar-cf, @superhighfives, @thebongy, @zeke, @cloudflare/product-owners
/src/content/glossary/ai-gateway.yaml @abhishekkankani, @adriandlam, @aninibread, @ethulia, @kathayl, @kflansburg, @mattrothenberg, @mchenco, @palashgo, @roerohan, @shridhar-cf, @superhighfives, @thebongy, @zeke, @cloudflare/product-owners

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 4, 2026

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://docs-aig-1532-ai-gateway-byok-only.previews.developers.cloudflare.com (commit 02ffdee)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://26b159e9.previews.developers.cloudflare.com 02ffdee 2026-09-08T13:44:27.444Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://85c60403.previews.developers.cloudflare.com a2d9717 2026-09-04T20:13:27.038Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://8c1c9e84.previews.developers.cloudflare.com 2651281 2026-09-04T16:37:45.949Z Visit the dashboard ↗

@superhighfives
superhighfives force-pushed the docs/AIG-1532-ai-gateway-byok-only branch from a2d9717 to 02ffdee Compare September 8, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:ai-gateway AI Gateway: https://developers.cloudflare.com/ai-gateway/ size/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.